package code;

import java.util.Vector;

public class RequestQueue extends Vector<Request> {
	public RequestQueue(){
		super();
	}
	public void enqueue(Request request){
		this.add(request);
	}
	public Request dequeue() throws EmptyQueueWhenDequeueException{
		try{
			return this.remove(0);
		}catch (Exception e) {
			throw new EmptyQueueWhenDequeueException("Queue is empty when dequeue!");
		}
	}
	public int size(){
		return super.size();
	}
	public boolean isEmpty(){
		return super.isEmpty();
	}
}

